package database;

import java.util.Objects;

public class DVD extends Item{
    private String director;
    public DVD(String title, String director, int playingTime, String comment) {
        super(title, playingTime,false, comment);
        this.director = director;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        DVD dvd = (DVD) o;
        return Objects.equals(director, dvd.director);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), director);
    }

    @Override
    public void print() {
        System.out.print("DVD: ");
        super.print();
        System.out.println(director);
    }

    public static void main(String[] args) {
        DVD dvd = new DVD("a","aaa",1,"a");

    }
}
